import sys
from setuptools import setup, find_packages

target = sys.argv[4:]
sys.argv = sys.argv[0:4]

if target:
	target = target[0]



if target == 'test':
	setup(
		name = "test",
		version = "0.2",
		description = """Test Plugin""",
		author = 'Jack Krieger',
	#	install_requires = [''],
		packages = ['test_src'],
	#	package_data = {'': ['pyodbc.*']},
		entry_points = """
		[message]
		handler = test_src.test_module:test_message
		[presence]
		handler = test_src.test_module:test_presence
		[query]
		handler = test_src.test_module:test_query
		[command]
		say = test_src.test_module:test_command
		""")

if target == 'room':
	setup(
		name = "room",
		version = "0.1",
		description = """ Room management""",
		author = 'Jack Krieger',
	#	install_requires = [''],
		packages = ['room_src'],
	#	package_data = {'': ['pyodbc.*']},
		entry_points = """
		[command]
		join = room_src.room_module:join_room
		leave = room_src.room_module:leave_room
		""")

if target == 'power':
	setup(
		name = "power",
		version = "0.1",
		description = """ Power management""",
		author = 'Jack Krieger',
	#	install_requires = [''],
		packages = ['power_src'],
	#	package_data = {'': ['pyodbc.*']},
		entry_points = """
		[command]
		stop = power_src.power_module:stop_nest
		restart = power_src.power_module:restart_nest
		""")
